import req from '@/utils/req'
/*用户*********************************************************************************/
//用户列表
export function getUserList(obj) {
  return req.get('/user/list',obj)
}
//创建用户
export function createUser(obj) {
  return req.post('/user/add', obj)
}
//查看用户的一条数据
export function searchUserRow(obj) {
  return req.post('/user/getUser' , obj)
}
//更新用户
export function updateUser(obj) {
  return req.post('/user/update', obj)
}
//删除
export function delRow(obj) {
  return req.post('/user/delete',obj)
}
//修改密码
export function updatePassword(obj) {
  return req.post('/user/updatePassword?newPassword='+obj)
}
//用户关联角色--创建(勾选一个创建一个)
export function relationRoleOne(obj) {
  return req.post('/auth/userRole/create', obj)
}
//用户关联角色--创建(同时关联多个)
export function relationRoleMore(userId,roleIds) {
  return req.post('/auth/userRole/createBatch?userId='+userId+'&roleIds='+roleIds);
}
//用户关联角色--查询
export function searchRelationRoleRow(id) {
  return req.get('/auth/userRole/listAll?search_EQ_userId='+id)
}
